/**
 *@Author: zt
 *@Description: 备勤相关接口
 *@Date 2024-08-21
 */
import request from "@/http";

// 列表分页查询
export const page = async (data?: object) => {
  return await request.post({
    url: "/api/bizz/admTStandby/page",
    data: data,
  });
};

// 查询当月备勤人员列表(对象内部结构)
export const dutyUserPage = async (data?: object) => {
  return await request.post({
    url: "/api/bizz/admTStandby/selectStandUser",
    data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 查询当月备勤天数
export const dutyUserDay = async (data?: object) => {
  return await request.post({
    url: "/api/bizz/admTStandby/standsByMon",
    data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 新增
export const add = async (data: object) => {
  return await request.post({
    url: "/api/bizz/admTStandby",
    data: data,
  });
};

// 删除
export const del = async (data: Array<any>) => {
  return await request.post({
    url: "/api/bizz/admTStandby/delete",
    data,
    headersType: "application/x-www-form-urlencoded",
  });
};

// 单体查询
export const query = async (id: String) => {
  return await request.get({
    url: "/api/bizz/admTStandby/details/" + id,
  });
};

//单体查询不要details
export const getQuery = async (id: String) => {
  return await request.get({
    url: "/api/bizz/admTStandby/" + id,
  });
};

// 查询部门考勤数据
export const selectStandDeptPage = async (data: String) => {
  return await request.post({
    url: "/api/bizz/admTStandby/selectStandDeptPage",
    data: data,
    // headersType: 'application/x-www-form-urlencoded'
  });
};

// 查询节假日
export const selectNoWorkDay = async () => {
  return await request.post({
    url: "/api/bizz/admTStandby/selectNoWorkDay",
    // headersType: 'application/x-www-form-urlencoded'
  });
};
